<template>
  <div class="">
    {{count}}
  </div>
</template>

<script>
import { reactive, ref, toRefs } from "vue";
export default {
  name: "Test",
  props:['name'],
  setup(props,context) {
    const state = reactive({
      count: 0,
    });
    console.log(name,1)
    const num = ref(0);
    console.log(props.name,2)

    context.emit('aaName',"大家好")
    return {
      ...toRefs(state),
      num,
    };
  },
};
</script>